<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/tiles/view/taglib.jsp" %>

<div id="page-wrapper">
  <div class="row">
    <div class="col-lg-12">
      <h2 class="page-header">Checkboxes</h2>
    </div>
  </div>
  <div class="row">
    <div class="col-lg-6">
      <form:form method="POST" commandName="customer">

        <%--静态数据--%>
        <%--<foss:checkboxes id="cities" path="cities"--%>
        <%--items="${cities}" itemLabel="name" itemValue="value" hidden="true" />--%>

        <%--动态数据--%>
        <div class="form-group">
          <label for="cities"><spring:message code="label.city"/></label>
          <br>
          <foss:checkboxes id="cities" path="cities"
                           dataClass="com.foreveross.framework.example.tags.service.CityService"
                           dataMethod="findCities"
                           itemLabel="name" itemValue="value"/>
        </div>

        <%--动态数据，隐藏--%>
        <%--<foss:checkboxes id="cities" path="cities"--%>
        <%--dataClass="com.foreveross.framework.example.tags.service.CityService"--%>
        <%--dataMethod="findCities"--%>
        <%--itemLabel="name" itemValue="value" hidden="true"/>--%>

      </form:form>
    </div>
  </div>
</div>